package com.peanut.baby.repository;


import com.peanut.baby.db.DBManager;
import com.peanut.baby.model.AppMsg;

/**
 * Created by anonymouslystudio on 2017/7/10.
 */

public class MsgRepository {
    private static final String TAG = MsgRepository.class.getSimpleName();
    private static final class InstanceHolder{
        public static final MsgRepository _instance = new MsgRepository();
    }

    public static MsgRepository getInstance(){
        return InstanceHolder._instance;
    }

    public boolean hasReadedFlag(AppMsg msg){
        return DBManager.getInstance().isMsgHasReadedRecord(msg);
    }

    public boolean updateReadedFlag(AppMsg msg){
        return DBManager.getInstance().insertMsgReadedFlag(msg);
    }
}
